package j05zuoye;

import java.util.Arrays;
import java.util.Locale;
import java.util.stream.Stream;

public class Z2 {
    public static void main(String[] args) {
        Stream<String> stream = Stream.of("orange", "grape","apple", "banana", "kiwi", "pear", "watermelon");
        stream
                .filter(el->el.length()>5)
                .sorted()
                .forEach(el-> System.out.println(el+" "));

        System.out.println("===");
        Stream<String> stream2 = Arrays.stream(new String[]{"hello", "world", "java", "stream"});
        stream2.map(el->el.toUpperCase()).forEach(el-> System.out.println(el+" "));
    }
}
